1 module derelict.sdl2.gfx.primitives;
2 
3 import derelict.sdl2.sdl;
4 
5 extern(C) @nogc nothrow
6 {
7 	// Pixel
8     alias da_pixelColor = int function(SDL_Renderer *, short, short, uint);
9     alias da_pixelRGBA = int function(SDL_Renderer *, short, short, int, int, int, int);
10 
11 	// Horizontal Line
12 	alias da_hlineColor = int function(SDL_Renderer *, short, short, short, int);
13 	alias da_hlineRGBA = int function(SDL_Renderer *, short, short, short, int, int, int, int);
14 
15 	// Vertical Line
16 	alias da_vlineColor = int function(SDL_Renderer *, short, short, short, int);
17 	alias da_vlineRGBA = int function(SDL_Renderer *, short, short, short, int, int, int, int);
18 	
19 	// Rectangle
20 	alias da_rectangleColor = int function(SDL_Renderer *, short, short, short, short, uint);
21     alias da_rectangleRGBA = int function(SDL_Renderer *, short, short, short, short, int, int, int, int);
22 	
23 	// Rounded-Corner Rectangle
24 	alias da_roundedRectangleColor = int function(SDL_Renderer *, short, short, short, short, short, uint);
25 	alias da_roundedRectangleRGBA = int function(SDL_Renderer *, short, short, short, short, short, int, int, int, int);
26 
27 	// Filled rectangle (Box)
28 	alias da_boxColor = int function(SDL_Renderer *, short, short, short, short, uint);
29     alias da_boxRGBA = int function(SDL_Renderer *, short, short, short, short, int, int, int, int);
30 
31 	// Rounded-Corner Filled rectangle (Box)
32 	alias da_roundedBoxColor = int function(SDL_Renderer *, short, short, short, short, short, uint);
33     alias da_roundedBoxRGBA = int function(SDL_Renderer *, short, short, short, short, short, int, int, int, int);
34 
35 	// Line
36 	alias da_lineColor = int function(SDL_Renderer *, short, short, short, short, uint);
37 	alias da_lineRGBA = int function(SDL_Renderer *, short, short, short, short, int, int, int, int);
38 	
39 	// AA Line
40 	alias da_aalineColor = int function(SDL_Renderer *, short, short, short, short, uint);
41 	alias da_aalineRGBA = int function(SDL_Renderer *, short, short, short, short, int, int, int, int);
42 	
43 	// Thick Line
44 	alias da_thickLineColor = int function(SDL_Renderer *, short, short, short, short, uint, uint);
45 	alias da_thickLineRGBA = int function(SDL_Renderer *, short, short, short, short, uint, int, int, int, int);
46 
47 	// Circle
48 	alias da_circleColor = int function(SDL_Renderer *, short, short, short, uint);
49 	alias da_circleRGBA = int function(SDL_Renderer *, short, short, short, int, int, int, int);
50 
51 	// Arc
52 	alias da_arcColor = int function(SDL_Renderer *, short, short, short, short, short, uint);
53 	alias da_arcRGBA = int function(SDL_Renderer *, short, short, short, short, short, int, int, int, int);
54 
55 	// AA Circle
56 	alias da_aacircleColor = int function(SDL_Renderer *, short, short, short, uint);
57 	alias da_aacircleRGBA = int function(SDL_Renderer *, short, short, short, int, int, int, int);
58 	
59 	// Filled Circle
60 	alias da_filledCircleColor = int function(SDL_Renderer *, short, short, short, uint);
61 	alias da_filledCircleRGBA = int function(SDL_Renderer *, short, short, short, int, int, int, int);
62 
63 	// Ellipse
64 	alias da_ellipseColor = int function(SDL_Renderer *, short, short, short, short, uint);
65 	alias da_ellipseRGBA = int function(SDL_Renderer *, short, short, short, short, int, int, int, int);
66 	
67 	// AA Ellipse
68 	alias da_aaellipseColor = int function(SDL_Renderer *, short, short, short, short, uint);
69 	alias da_aaellipseRGBA = int function(SDL_Renderer *, short, short, short, short, int, int, int, int);
70 	
71 	// Filled Ellipse
72 	alias da_filledEllipseColor = int function(SDL_Renderer *, short, short, short, short, uint);
73 	alias da_filledEllipseRGBA = int function(SDL_Renderer *, short, short, short, short, int, int, int, int);
74 
75 	// Pie
76 	alias da_pieColor = int function(SDL_Renderer *, short, short, short, short, short, uint);
77 	alias da_pieRGBA = int function(SDL_Renderer *, short, short, short, short, short, int, int, int, int);
78 
79 	// Filled Pie
80 	alias da_filledPieColor = int function(SDL_Renderer *, short, short, short, short, short, uint);
81 	alias da_filledPieRGBA = int function(SDL_Renderer *, short, short, short, short, short, int, int, int, int);
82 
83 	// Trigon
84 	alias da_trigonColor = int function(SDL_Renderer *, short, short, short, short, short, short, uint);
85 	alias da_trigonRGBA = int function(SDL_Renderer *, short, short, short, short, short, short, int, int, int, int);
86 
87 	// AA Trigon
88 	alias da_aatrigonColor = int function(SDL_Renderer *, short, short, short, short, short, short, uint);
89 	alias da_aatrigonRGBA = int function(SDL_Renderer *, short, short, short, short, short, short, int, int, int, int);
90 
91 	// Filled Trigon
92 	alias da_filledTrigonColor = int function(SDL_Renderer *, short, short, short, short, short, short, uint);
93 	alias da_filledTrigonRGBA = int function(SDL_Renderer *, short, short, short, short, short, short, int, int, int, int);
94 
95 	// Polygon
96 	alias da_polygonColor = int function(SDL_Renderer *, const short *, const short *, int, uint);
97 	alias da_polygonRGBA = int function(SDL_Renderer *, const short *, const short *, int, int, int, int, int);
98 
99 	// AA Polygon
100 	alias da_aapolygonColor = int function(SDL_Renderer *, const short *, const short *, int, uint);
101 	alias da_aapolygonRGBA = int function(SDL_Renderer *, const short *, const short *, int, int, int, int, int);
102 	
103 	// Filled Polygon
104 	alias da_filledPolygonColor = int function(SDL_Renderer *, const short *, const short *, int, uint);
105 	alias da_filledPolygonRGBA = int function(SDL_Renderer *, const short *, const short *, int, int, int, int, int);
106 	
107 	// Textured Polygon
108 	alias da_texturedPolygon = int function(SDL_Renderer *, const short *, const short *, int, SDL_Surface *, int, int);
109 
110 	// Bezier
111 	alias da_bezierColor = int function(SDL_Renderer *, const short *, const short *, int, int, uint);
112 	alias da_bezierRGBA = int function(SDL_Renderer *, const short *, const short *, int, int, int, int, int, int);
113 
114 	// Characters/Strings
115 	alias da_gfxPrimitivesSetFont = void function(const void *, uint, uint);
116 	alias da_gfxPrimitivesSetFontRotation = void function(uint);
117 	alias da_characterColor = int function(SDL_Renderer *, short, short, char, uint);
118 	alias da_characterRGBA = int function(SDL_Renderer *, short, short, char, int, int, int, int);
119 	alias da_stringColor = int function(SDL_Renderer *, short, short, const char *, uint);
120 	alias da_stringRGBA = int function(SDL_Renderer *, short, short, const char *, int, int, int, int);
121 }
122 
123 __gshared
124 {
125 	// Pixel
126 	da_pixelColor pixelColor;
127 	da_pixelRGBA pixelRGBA;
128 
129 	// Horizontal Line
130 	da_hlineColor hlineColor;
131 	da_hlineRGBA hlineRGBA;
132 
133 	// Vertical Line
134 	da_vlineColor vlineColor;
135 	da_vlineRGBA vlineRGBA;
136 
137 	// Rectangle
138 	da_rectangleColor rectangleColor;
139 	da_rectangleRGBA rectangleRGBA;
140 	
141 	// Rounded-Corner Rectangle
142 	da_roundedRectangleColor roundedRectangleColor;
143 	da_roundedRectangleRGBA roundedRectangleRGBA;
144 	
145 	// Filled rectangle (Box)
146 	da_boxColor boxColor;
147 	da_boxRGBA boxRGBA;
148 	
149 	// Rounded-Corner Filled rectangle (Box)
150 	da_roundedBoxColor roundedBoxColor;
151 	da_roundedBoxRGBA roundedBoxRGBA;
152 	
153 	// Line
154 	da_lineColor lineColor;
155 	da_lineRGBA lineRGBA;
156 
157 	// AA Line
158 	da_aalineColor aalineColor;
159 	da_aalineRGBA aalineRGBA;
160 
161 	// Thick Line
162 	da_thickLineColor thickLineColor;
163 	da_thickLineRGBA thickLineRGBA;
164 
165 	// Circle
166 	da_circleColor circleColor;
167 	da_circleRGBA circleRGBA;
168 	
169 	// Arc
170 	da_arcColor arcColor;
171 	da_arcRGBA arcRGBA;
172 
173 	// AA Circle
174 	da_aacircleColor aacircleColor;
175 	da_aacircleRGBA aacircleRGBA;
176 	
177 	// Filled Circle
178 	da_filledCircleColor filledCircleColor;
179 	da_filledCircleRGBA filledCircleRGBA;
180 
181 	// Ellipse
182 	da_ellipseColor ellipseColor;
183 	da_ellipseRGBA ellipseRGBA;
184 	
185 	// AA Ellipse
186 	da_aaellipseColor aaellipseColor;
187 	da_aaellipseRGBA aaellipseRGBA;
188 	
189 	// Filled Ellipse
190 	da_filledEllipseColor filledEllipseColor;
191 	da_filledEllipseRGBA filledEllipseRGBA;
192 
193 	// Pie
194 	da_pieColor pieColor;
195 	da_pieRGBA pieRGBA;
196 
197 	// Filled pie
198 	da_filledPieColor filledPieColor;
199 	da_filledPieRGBA filledPieRGBA;
200 
201 	// Trigon
202 	da_trigonColor trigonColor;
203 	da_trigonRGBA trigonRGBA;
204 	
205 	// AA Trigon
206 	da_aatrigonColor aatrigonColor;
207 	da_aatrigonRGBA aatrigonRGBA;
208 
209 	// filled Trigon
210 	da_filledTrigonColor filledTrigonColor;
211 	da_filledTrigonRGBA filledTrigonRGBA;
212 
213 	// Polygon
214 	da_polygonColor polygonColor;
215 	da_polygonRGBA polygonRGBA;
216 
217 	// AA Polygon
218 	da_aapolygonColor aapolygonColor;
219 	da_aapolygonRGBA aapolygonRGBA;
220 	
221 	// Filled Polygon
222 	da_filledPolygonColor filledPolygonColor;
223 	da_filledPolygonRGBA filledPolygonRGBA;
224 	
225 	// Textured Polygon
226 	da_texturedPolygon texturedPolygon;
227 	
228 	// Bezier
229 	da_bezierColor bezierColor;
230 	da_bezierRGBA bezierRGBA;
231 	
232 	// Characters/Strings
233 	da_gfxPrimitivesSetFont gfxPrimitivesSetFont;
234 	da_gfxPrimitivesSetFontRotation gfxPrimitivesSetFontRotation;
235 	da_characterColor characterColor;
236 	da_characterRGBA characterRGBA;
237 	da_stringColor stringColor;
238 	da_stringRGBA stringRGBA;
239 }
240